home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 4 / FM Towns Free Software Collection 4 - Disc 1.iso / t_os / mricon / source / defs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-19  |  2.9 KB  |  129 lines

  1. #define TRUE    1
  2. #define FALSE   0
  3. #define ERR     (-1)
  4.  
  5. #define UCHAR   unsigned char
  6. #define SHORT   short int
  7. #define    UNSIG    unsigned int
  8.  
  9. #define    SCR_X    80
  10. #define MAX_X   80
  11. #define MAX_Y   25
  12.  
  13. #define DMYKAN  0xFE
  14. #define TABSIZ  8
  15. #define    ESPSIZ    32
  16.  
  17. typedef union {
  18.     struct {
  19.     SHORT    es;
  20.     SHORT    ds;
  21.     SHORT    di;
  22.     SHORT    si;
  23.     SHORT    bp;
  24.     SHORT    sp;
  25.     SHORT    bx;
  26.     SHORT    dx;
  27.     SHORT    cx;
  28.     SHORT    ax;
  29.     SHORT    ip;
  30.     SHORT    cs;
  31.     SHORT    cf;
  32.     } x;
  33.     struct {
  34.     SHORT    _es;
  35.     SHORT    _ds;
  36.     SHORT    _di;
  37.     SHORT    _si;
  38.     SHORT    _bp;
  39.     SHORT    _sp;
  40.     UCHAR    bl,bh;
  41.     UCHAR    dl,dh;
  42.     UCHAR    cl,ch;
  43.     UCHAR    al,ah;
  44.     SHORT    _ip;
  45.     SHORT    _cs;
  46.     SHORT    _cf;
  47.     } h;
  48. } REGSET;
  49.  
  50. #define    U_AX    (regs->x.ax)
  51. #define U_AH    (regs->h.ah)
  52. #define    U_AL    (regs->h.al)
  53. #define    U_BX    (regs->x.bx)
  54. #define U_BH    (regs->h.bh)
  55. #define    U_BL    (regs->h.bl)
  56. #define    U_CX    (regs->x.cx)
  57. #define U_CH    (regs->h.ch)
  58. #define    U_CL    (regs->h.cl)
  59. #define    U_DX    (regs->x.dx)
  60. #define U_DH    (regs->h.dh)
  61. #define    U_DL    (regs->h.dl)
  62. #define    U_DI    (regs->x.di)
  63. #define    U_SI    (regs->x.si)
  64. #define    U_DS    (regs->x.ds)
  65. #define    U_ES    (regs->x.es)
  66. #define    U_CF    (regs->x.cf)
  67.  
  68. typedef struct {
  69.     SHORT    cvram;
  70.     SHORT    kvram;
  71.         SHORT   cur_x;
  72.         SHORT   cur_y;
  73.         SHORT   cur_type;
  74.         SHORT   cur_off;
  75.         SHORT   cur_siz;
  76.         UCHAR   cur_flg;
  77.         UCHAR   com_mode;
  78.         SHORT   scr_y;
  79.         SHORT   color;
  80.         SHORT   bakcol;
  81.         SHORT   tabflg;
  82.         SHORT   odr_flg;
  83.         SHORT   kanmod;
  84.         UCHAR   bakch1;
  85.         UCHAR   kancod;
  86.         SHORT   extflg;
  87.         SHORT   esccnt;
  88.         SHORT   bak_x;
  89.         SHORT   bak_y;
  90.         void    (*extpro)();
  91.         UCHAR   tabmap[MAX_X/8];
  92.         UCHAR   escprm[ESPSIZ];
  93. } CONPARA;
  94.  
  95. #define    CVRAM        (actv->cvram)
  96. #define    KVRAM        (actv->kvram)
  97. #define CUR_X           (actv->cur_x)
  98. #define CUR_Y           (actv->cur_y)
  99. #define CUR_TYPE        (actv->cur_type)
  100. #define CUR_OFF         (actv->cur_off)
  101. #define CUR_SIZ         (actv->cur_siz)
  102. #define CUR_FLG         (actv->cur_flg)
  103. #define COM_MODE        (actv->com_mode)
  104. #define SCR_Y           (actv->scr_y)
  105. #define COLOR           (actv->color)
  106. #define BAKCOL          (actv->bakcol)
  107. #define TABFLG          (actv->tabflg)
  108. #define ODR_FLG         (actv->odr_flg)
  109. #define KANMOD          (actv->kanmod)
  110. #define BAKCH1          (actv->bakch1)
  111. #define KANCOD          (actv->kancod)
  112. #define EXTFLG          (actv->extflg)
  113. #define ESCCNT          (actv->esccnt)
  114. #define BAK_X           (actv->bak_x)
  115. #define BAK_Y           (actv->bak_y)
  116. #define EXTPRO          (actv->extpro)
  117. #define TABMAP          (actv->tabmap)
  118. #define ESCPRM          (actv->escprm)
  119.  
  120. extern    REGSET far    *regs;
  121. extern    CONPARA        *actv;
  122. extern    UCHAR        ACT_DSP;
  123. extern    SHORT        CUR_OLD_XY;
  124. extern    SHORT        CUR_DISP_X;
  125. extern    SHORT        CUR_DISP_Y;
  126. extern    SHORT        CUR_DISP_OFF;
  127. extern    SHORT        CUR_DISP_SIZ;
  128. extern    UCHAR        CUR_DISP_FLG;
  129.